/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.fee.entity.Receivables;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 应收结算单MAPPER接口
 * @author weisong
 * @version 2017-09-22
 */
@MyBatisMapper
public interface ReceivablesMapper extends BaseMapper<Receivables> {
    // 查询最大的单号和日期【用来生成单号】
    public Receivables findClearingNoAndBusyDate();

    //根据id更新状态
    public int updateStatusAndMoneyById(@Param("status")Integer status, @Param("invoiceMoney")Double invoiceMoney,
                                        @Param("vcaMoney") Double vcaMoney, @Param("noInvoiceMoney") Double noInvoiceMoney,
                                        @Param("noVcaMoney") Double noVcaMoney, @Param("id")String id);

    //根据收款单子表id查询对应的应收结算单-
    public Receivables findByBillDetailId(@Param(value="id")String id);

    //收款单引入已确认的数据
    public List<Receivables> findAllByStatus(@Param(value="payerName")String payerName, @Param(value="status")Integer status);
}